|u         | up
|d         | down
|l         | left
|r         | right
|f         | forward
|tl        | turn left
|tr        | turn right
|uu        | u,u
|dd        | d,d
|ll        | l,l
|rr        | r,r
|ff        | f,f
|tll       | tl,tl
|trr       | tr,tr
|uuu       | uu,u
|ddd       | dd,d
|lll       | ll,l
|rrr       | rr,r
|fff       | ff,f
|tlll      | tll,tl
|trrr      | trr,tr
|uuuu      | uu,uu
|dddd      | dd,dd
|llll      | ll,ll
|rrrr      | rr,rr
|ffff      | ff,ff
|tllll     | tll,tll
|trrrr     | trr,trr
|up        | @pen-up
|down      | @pen-down
|left      | @pen-left
|right     | @pen-right
|forward   | @pen-forward
|turn left | @pen-turn-left
|turn right| @pen-turn-right
|pen down  | @pen-start
|pen up    | @pen-stop

|@pen-start| @pen-draw
|@pen-stop, @pen-draw| @pen-stop
|@pen-stop|

||@pen-direction-right
|@pen-forward, @pen-direction-up   | @pen-up,    @pen-direction-up
|@pen-forward, @pen-direction-down | @pen-down,  @pen-direction-down
|@pen-forward, @pen-direction-left | @pen-left,  @pen-direction-left
|@pen-forward, @pen-direction-right| @pen-right, @pen-direction-right

|@pen-turn-left, @pen-direction-up   | @pen-direction-left
|@pen-turn-left, @pen-direction-down | @pen-direction-right
|@pen-turn-left, @pen-direction-left | @pen-direction-down
|@pen-turn-left, @pen-direction-right| @pen-direction-up

|@pen-turn-right, @pen-direction-up   | @pen-direction-right
|@pen-turn-right, @pen-direction-down | @pen-direction-left
|@pen-turn-right, @pen-direction-left | @pen-direction-up
|@pen-turn-right, @pen-direction-right| @pen-direction-down

|@pen-lift, @pen-draw| @pen-lift
|@pen-lift|

|@pixel-x = @pen-x:max| @pixel-x = @pen-x:4294967295
|@pixel-y = @pen-y:max| @pixel-y = @pen-y:4294967295
|@pen-x <- @pen-x-temp:max| @pen-x <- @pen-x-temp:4294967295
|@pen-y <- @pen-y-temp:max| @pen-y <- @pen-y-temp:4294967295

|@pixel-x = @pen-x, @pen-x          | @pen-x-temp,
                                      @pixel-x,
                                      @pixel-x = @pen-x
|@pixel-x = @pen-x                  | @pen-x <- @pen-x-temp
|@pen-x <- @pen-x-temp, @pen-x-temp | @pen-x, @pen-x <- @pen-x-temp
|@pen-x <- @pen-x-temp              |

|@pixel-y = @pen-y, @pen-y          | @pen-y-temp,
                                      @pixel-y,
                                      @pixel-y = @pen-y
|@pixel-y = @pen-y                  | @pen-y <- @pen-y-temp
|@pen-y <- @pen-y-temp, @pen-y-temp | @pen-y, @pen-y <- @pen-y-temp
|@pen-y <- @pen-y-temp              |

|@trigger-set-pixel| @set-pixel

|@pen-x++| @pen-x
|@pen-x--, @pen-x|
|@pen-x--|

|@pen-y++| @pen-y
|@pen-y--, @pen-y|
|@pen-y--|

|@pen-left, @pen-draw|
    @pixel-x = @pen-x:max,
    @pixel-y = @pen-y:max,
    @pen-draw,
    @trigger-set-pixel,
    @pen-x--

|@pen-left|
    @pen-x--

|@pen-right, @pen-draw|
    @pixel-x = @pen-x:max,
    @pixel-y = @pen-y:max,
    @pen-draw,
    @trigger-set-pixel,
    @pen-x++

|@pen-right|
    @pen-x++

|@pen-up, @pen-draw|
    @pixel-x = @pen-x:max,
    @pixel-y = @pen-y:max,
    @pen-draw,
    @trigger-set-pixel,
    @pen-y--

|@pen-up|
    @pen-y--

|@pen-down, @pen-draw|
    @pixel-x = @pen-x:max,
    @pixel-y = @pen-y:max,
    @pen-draw,
    @trigger-set-pixel,
    @pen-y++

|@pen-down|
    @pen-y++




|| start
|start|
    pen up,
    rrrr,rrrr,rrrr,rrrr,
    dddd,dddd,dddd,dddd,
    main
|main|
    draw a frame,
    display
|draw a frame|1
|1|2, pen down, rrrr, rrrr, rrrr, rrrr
|2|3, dddd, dddd, dddd, dddd
|3|4, llll, llll, llll, llll
|4|   uuuu, uuuu, uuuu, uuuu
|display| @display